//
//  UILabel+Util.m
//  CarUser
//
//  Created by ayi on 2018/12/24.
//  Copyright © 2018 王森林. All rights reserved.
//

#import "UILabel+Util.h"

@implementation UILabel (Util)

//lab 的公共创建方式
+ (UILabel *)customInitLabWithFont:(CGFloat )fontSize andTextColor:(UIColor *)color andAlign:(NSTextAlignment )textAlign{
    UILabel *lab = [[UILabel alloc]init];
    lab.font = FONT_SIZE(fontSize);;
    lab.textColor = color;
    lab.textAlignment = textAlign;
    lab.layer.masksToBounds = YES;
    return lab;
}

+ (UILabel *)customInitLabWithFont:(CGFloat )fontSize andTextColor:(UIColor *)color andAlign:(NSTextAlignment )textAlign withBgColor:(UIColor *)bgcolor{
    UILabel *lab = [self customInitLabWithFont:fontSize andTextColor:color andAlign:textAlign];
    lab.backgroundColor = bgcolor?bgcolor:UIColor.whiteColor;
    return lab;
}


@end
